package com.mlm.mlmapp.adapter.view;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.flyco.dialog.widget.base.BaseDialog;
import com.mlm.mlmapp.R;
import com.mlm.mlmapp.adapter.view.adapter.DialogItemsAdapter;
import com.mlm.mlmapp.adapter.view.listener.DialogListener;
import com.mlm.mlmapp.cons.HTTPCons;

import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class ExitLoginDialog extends BaseDialog implements HTTPCons {
	private Context mContext;
	private int layout;
	MyListView items;
	List<JSONObject> list = new ArrayList<JSONObject>();
	TextView apply;
	TextView cancel;
	TextView sub_title;
	TextView tv_title;
	DialogListener l;
	public ExitLoginDialog(Context context, DialogListener l) {
		super(context);
		// TODO Auto-generated constructor stub
		this.mContext = context;
		this.l = l;
	}

	@Override
	public View onCreateView() {
		// TODO Auto-generated method stub
		View inflate = View.inflate(context, R.layout.dialog_login_cancel_layout, null);
		tv_title=(TextView) inflate.findViewById(R.id.title);
		sub_title=(TextView) inflate.findViewById(R.id.sub_title);
		apply = (TextView) inflate.findViewById(R.id.apply);
		cancel = (TextView) inflate.findViewById(R.id.cancel);
		apply.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				l.onApply(null,null);
			}
		});
		cancel.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				ExitLoginDialog.this.dismiss();
			}
		});
		return inflate;
	}

	public void setLayout(int layout) {
		this.layout = layout;
	}
	@Override
	public boolean setUiBeforShow() {
		// TODO Auto-generated method stub
		return false;
	}

}
